﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MessageManage.aspx.cs"
    Inherits="PowerToolsWeb.Admin.MessageManage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link type="text/css" rel="Stylesheet" href="../Style/admin.css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div class="DivTitle" style="vertical-align: bottom">
            <table cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <td align="left">
                        <img alt="" src="../Style/admin/tb.gif" width="14" height="14" /><span id="spannal"
                            runat="server">产品列表</span>
                    </td>
                </tr>
            </table>
        </div>
        <div class="divcon">
            &nbsp;<asp:DropDownList ID="ddlRead" runat="server">
                <asp:ListItem Text="全部" Value="-1"></asp:ListItem>
                <asp:ListItem Text="未读" Value="0" Selected="True"></asp:ListItem>
                <asp:ListItem Text="已读" Value="1"></asp:ListItem>
            </asp:DropDownList>
            &nbsp;&nbsp;留言时间：
            <asp:TextBox ID="txbStratDate" runat="server"></asp:TextBox>
            到
            <asp:TextBox ID="txbEndDate" runat="server"></asp:TextBox>
            &nbsp;<asp:Button ID="Button2" runat="server" Text="查 询" CssClass="button_bg2" OnClick="Button2_Click" />
        </div>
        <asp:GridView ID="GridView1" Width="100%" runat="server" AutoGenerateColumns="False"
            CssClass="GridView" OnRowCommand="GridView1_RowCommand" 
            onrowdatabound="GridView1_RowDataBound" AllowPaging="true" PageSize="25" 
            onpageindexchanging="GridView1_PageIndexChanging" >
            <PagerStyle CssClass="pager" HorizontalAlign="Center" VerticalAlign="Middle" />
            <Columns>
                <asp:BoundField HeaderText="留言人" DataField="NAME" ItemStyle-Width="9%"></asp:BoundField>
                <asp:BoundField HeaderText="公司" DataField="COMPANY" ItemStyle-Width="12%"></asp:BoundField>
                <asp:BoundField HeaderText="联系电话" DataField="PHONE" ItemStyle-Width="9%"></asp:BoundField>
                <asp:BoundField HeaderText="Email" DataField="EMAIL" ItemStyle-Width="8%"></asp:BoundField>
                <asp:BoundField HeaderText="留言标题" DataField="TITLE" ItemStyle-Width="14%"></asp:BoundField>
                <asp:BoundField HeaderText="留言内容" DataField="CONTENT" ItemStyle-Width="23%"></asp:BoundField>
                <asp:BoundField HeaderText="留言时间" DataField="CREATTIME" ItemStyle-Width="11%"></asp:BoundField>
                <asp:TemplateField HeaderText="操作" ItemStyle-Width="14%">
                    <ItemTemplate>
                        <span id="spen1" runat="server" visible='<%#(Eval("IsRead").ToString()=="0") %>'>
                            <img src="../Style/admin/edit.gif" width="10" height="10" alt="" />
                            <asp:LinkButton ID="LinkButton1" runat="server" CommandArgument='<%#Eval("MESSAGEID") %>'
                                CommandName="SetRead">设为已读</asp:LinkButton>
                            &nbsp;&nbsp;|&nbsp;&nbsp;</span>
                        <img src="../Style/admin/del.gif" width="10" height="10" alt="" />
                        <asp:LinkButton ID="lbDelete" runat="server" CommandArgument='<%#Eval("MESSAGEID") %>'
                            CommandName="DeleteMsg" OnClientClick="return confirm('你确认删除该留言？');">删除</asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
    </form>
</body>
</html>
